In computer science, a virtual machine is a software implementation of a machine (computer) that executes programs like real physical hardware. System virtual machines (sometimes called hardware virtual machines) allow the sharing of the underlying physical machine resources between different virtual machines, each running its own operating system. The software layer that executes one or more virtual machines is called a virtual machine monitor or hypervisor. A hypervisor can run on bare hardware (Type 1 or native virtual machine) or on top of an operating system (Type 2 or hosted virtual machine). Some advantages of system virtual machines are: multiple operating system environments can co-exist on the same computer, in strong isolation from each other; the virtual machine can provide an instruction set architecture that is somewhat different from that of the real machine; and administrators can consolidate underutilized servers by running multiple virtual machines on one physical computer system. Multiple virtual machines each running their own operating system (called a guest operating system) are frequently used in server consolidation, where different services that used to run on individual machines in order to avoid interference are instead run in separate virtual machines on the same physical machine.
Running multiple operating systems allows time-sharing a single computer between several single-tasking operating systems. This technique includes a process to share the CPU resources between guest operating systems and memory virtualization to share the memory on the host. The guest operating systems do not have to all be the same, making it possible to run different operating systems on the same computer (e.g., Microsoft Windows™ and Linux, or older versions of an operating system in order to support software that has not yet been ported to the latest operating system version). The use of virtual machines to support different guest operating systems is also sometimes used in embedded systems. One use is to support a real-time operating system at the same time as a high-level operating system such as Linux or Windows™. Another use of virtual machines is to execute an operating system that is not trusted in a “sandbox.” Virtual machines can also provide other advantages for operating system development, including improved debugging access and faster reboots.
Application virtualization is a technique that provides a virtual environment at the application level. For example, a host operating system may natively run some applications, while providing a virtual environment for running others (i.e., virtualized applications). Unlike the machine-level virtualization described above where an entire machine is virtualized in a way that allows running an operating system, application virtualization provides a virtual environment sufficient to run a single application or multiple applications. This may allow the operating system, for example, to run applications inherently conflicting with each other. Application virtualization blurs a distinction for the user between applications running natively in the host operating system and applications running in a virtual environment. For example, both types of applications may appear side by side in a taskbar or menu provided by the operating system shell.
Although virtualized applications may appear similar to native applications to a user, resources expected or required by the virtualized application may not be installed on the host operating system. For example, files, registry keys, configuration settings, and other resources may be unavailable or stored in a different location than that presented to the application by the virtual environment. In some cases, the virtualized application includes a package or other object in an archive format that contains the resources expected by the virtualized application. It can be difficult to ensure that the application can find resources that are not installed locally so that the application will run correctly and remain unaware of the virtualized environment. A class of resource requests may originate in operating system code that is called within a process of the virtual application. These requests may be marshaled and provided to a helper process that is outside of the virtual environment. This helper process may make requests to the host operating system on behalf of one or more virtual processes. For the helper process to do its work correctly, it may need to access the resources in a location established by the virtual environment.